#!/bin/bash

source /etc/profile

cd /bigbluebutton/deskshare
service bbb-red5 stop
[[ "$2" == "true" ]] && gradle resolveDeps
[[ "$1" == "true" ]] && echo "rebuild bigbluebutton deskshare" && gradle war
echo "gradle deploy" && gradle deploy
service bbb-red5 start
